import request from '@/utils/request'

// 邮箱登录
export function login (data) {
    return request({
        url: '/login',
        method: 'post',
        data
    })
}

// 扫码登录
export function scanCode (params) {
    return request({
        url: '/auth',
        method: 'get',
        params
    })
}

// 退出登录
export function logout (userId) {
    return request({
        url: `/logout/${userId}`,
        method: 'delete'
    })
}